-- GENERATED SPELL FOR [Anub'ar Crusher] --


function spell0_28922(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(53801,pUnit)
pUnit:RegisterEvent('Sorts_28922', 591, 1)
end

function spell1_28922(pUnit, Event) --@Smash,n/a--
pUnit:FullCastSpellOnTarget(53318,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28922', 600, 1)
end

function spell2_28922(pUnit, Event) --@Smash,n/a--
pUnit:FullCastSpellOnTarget(59346,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28922', 600, 1)
end

function Sorts_28922(pUnit, Event)
local choix_sorts_28922 = math.random(0, 2)
if choix_sorts_28922 == 0 then
pUnit:RegisterEvent('spell0_28922', 1, 1)
end
if choix_sorts_28922 == 1 then
pUnit:RegisterEvent('spell1_28922', 1, 1)
end
if choix_sorts_28922 == 2 then
pUnit:RegisterEvent('spell2_28922', 1, 1)
end
end

function mob28922_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28922', math.random(1500, 3000), 1)
end

function mob28922_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28922_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28922_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28922, 1, 'mob28922_Action')
RegisterUnitEvent(28922, 2, 'mob28922_Leave')
RegisterUnitEvent(28922, 3, 'mob28922_Kill')
RegisterUnitEvent(28922, 4, 'mob28922_Die')
